import { axios } from '@/utils/request'

export function sysUserTypeList () {
  return axios({
    url: '/sys/userType/listSysUserType',
    method: 'get',
  })
}
export function sysAddUserType (parameter) {
  return axios({
    url: '/sys/userType/add',
    method: 'post',
    data: parameter
  })
}
export function sysEditUserType (parameter) {
  return axios({
    url: '/sys/userType/update',
    method: 'post',
    data: parameter
  })
}
export function sysDelUserType(id) {
    id = id === undefined ? '' : id;
    return axios({
        url:`/sys/userType/delete?id=${id}`,
        method: 'get'
    })
}
export function sysAddUserTypeMenu (parameter) {
  return axios({
    url: '/sys/typeMenu/add',
    method: 'post',
    data: parameter
  })
}
export function sysUserTypeIdMatchingTree(typeId) {
     typeId = typeId === undefined ? '' : typeId;
    return axios({
        url:`/sys/typeMenu/queryUserTypeMenuIdsByTypeId?typeId=${typeId}`,
        method: 'get'
    })
}
export function sysUserTypeCodeTree(code) {
     code = code === undefined ? '' : code;
    return axios({
        url:`/sys/typeMenu/queryUserTypeMenuByCode?code=${code}`,
        method: 'get'
    })
}



